#pragma once
#include <string.h>
#include "../Headers/types.h"
#include "../Headers/authr.h"
#include "../Headers/log.h"
#include "../Headers/nsr.h"
#include <iostream>


namespace TOB {
  class US: public NSRequired {
   public: 
    US(Nameserver::IP nsip);
    ~US();

    Code::Type getUintByLogin (std::string login, std::string field, int& value);
    Code::Type getStringByLogin (std::string login, std::string field, std::string& value);
    Code::Type existenceLogin (std::string login, int& value);
    Code::Type updateFieldByLogin (std::string login, std::string field, std::string value);
    Code::Type appendRow(std::string login, std::string password, std::string role, std::string policy, std::string name);
    Code::Type deleteRowByLogin (std::string login);

   protected:
    bool connected;

   private:
    CLIENT *client;
  };
}
